import request from '@/utils/request'

// 切换状态
export const changeStatus = (data) =>
  request.put('/service/status', data)

//获取客服负责的作家列表
export const getAuthorList = (params) =>
  request.get('/service/authorList',  { params })

//发送消息
export const sendMessage = (data) => {
  return request({
    url: '/service/send',
    method: 'POST',
    data: data // 参数放请求体，和后端 req.body 对应
  })
}

//获取历史聊天记录
export const getMessageHistory = (params) =>
  request.get('/service/history', { params })


//获取作家信息?
export const getAuthorInfo = (params) =>
  request.get('/service/authorinfo', { params })